@echo off
chcp 65001 >nul

:: 设置工作目录为脚本所在目录
cd /d %~dp0%

echo 正在启动 Flask 后端服务...
@REM start "" cmd /c "cd backend && server.exe"
start "" cmd /c "server.exe"

echo.
echo 正在启动前端 HTTP 服务器...
@REM cd dist
@REM python -m http.server 5173

@REM netsh http add urlacl url=http://*:5173/ user=Everyone
powershell.exe -ExecutionPolicy Bypass -File ".\start_http.ps1"
@REM powershell.exe -Command "Start-Process powershell.exe -ArgumentList '-ExecutionPolicy Bypass -File .\start_http.ps1' -Verb RunAs"

echo.
echo 应用已启动！
echo 请打开浏览器访问：http://localhost:5173
pause